Repository navigation
test: rebuild heap dump indexes when the MAT version changes - #133
Merged
Merged
Conversation
MAT opens the *.index and *.threads files next to a heap dump instead of
parsing the dump again. The files in MatCalciteTest/dumps are ignored by
git, so a local run reused indexes built by whichever MAT ran there
first, while CI parsed the dump from scratch. Indexes from MAT 1.13 hid a
difference in how MAT 1.15 prints native frames: the tests passed locally
and failed in CI with
expected:<...ng.Object.wait(J)V ([Native Method])> but was:<...ng.Object.wait(J)V ([Object.java(Native Method)])>
The tests now record the MAT bundle version, qualifier included, in
dumps/mvn1m_jdk18.mat-version and delete the dump's index files when the
record is missing or names another version. Deleting the indexes before
every test class was rejected: each of the four classes would parse the
dump again, and the same MAT would rebuild identical files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MAT opens the
*.indexand*.threadsfiles next to a heap dump instead of parsing the dump again.MatCalciteTest/dumpsignores them in git, so a local run reused indexes built by whichever MAT ran there first, while CI parsed the dump from scratch. Indexes from MAT 1.13 hid how MAT 1.15 prints native frames: the tests passed locally and failed in CI withThe tests now record the MAT bundle version, qualifier included, in
dumps/mvn1m_jdk18.mat-versionand delete the dump's index files when the record is missing or names another version. Deleting the indexes before every test class was rejected: each of the four classes would parse the dump again, and the same MAT would rebuild identical files.No automated test covers the deletion itself. Checked by hand with
./mvnw -q verify(49 tests, 0 failures each time): garbagemvn1m_jdk18.idx.indexand.threadswith no version file were deleted and the dump reparsed; a rerun deleted nothing; a version file set to1.0.0led to all 12 index files being deleted and the version rewritten to1.13.0.202204291409.🤖 Generated with Claude Code